﻿Imports myBookmarks.Core
Namespace myBookmarks.Web
    Public MustInherit Class BaseViewModel
        Private _SiteTitle As String
        Public Property SiteTitle() As String
            Get
                Return _SiteTitle
            End Get
            Set(ByVal value As String)
                _SiteTitle = value
            End Set
        End Property
        Private _RootUrl As String
        Public Property RootUrl() As String
            Get
                Return _RootUrl
            End Get
            Set(ByVal value As String)
                _RootUrl = value
            End Set
        End Property
        Private _MetaKeywords As String
        Public Property MetaKeywords() As String
            Get
                Return _MetaKeywords
            End Get
            Set(ByVal value As String)
                _MetaKeywords = value
            End Set
        End Property
        Private _MetaDescription As String
        Public Property MetaDescription() As String
            Get
                Return _MetaDescription
            End Get
            Set(ByVal value As String)
                _MetaDescription = value
            End Set
        End Property
        Private _User As User
        Public Property CurrentUser() As User
            Get
                Return _User
            End Get
            Set(ByVal value As User)
                _User = value
            End Set
        End Property
        Public ReadOnly Property UserContactList() As String
            Get
                Dim l = (From uc In CurrentUser.UserContacts _
                                    Select contact = String.Format("""{0}""", uc.UserContact)).ToArray
                Return String.Join(",", l)
            End Get
        End Property
        Private _flashMessage As String
        Public Property FlashMessage() As String
            Get
                Return _flashMessage
            End Get
            Set(ByVal value As String)
                _flashMessage = value
            End Set
        End Property


    End Class

End Namespace
